import 'package:json_annotation/json_annotation.dart';

part 'printer.g.dart';

@JsonSerializable()
class Printer extends Object {
  @JsonKey(name: 'id')
  int id;

  @JsonKey(name: 'ctime')
  String ctime;

  @JsonKey(name: 'utime')
  String utime;

  @JsonKey(name: 'printerGuid')
  String printerGuid;

  @JsonKey(name: 'deviceId')
  int deviceId;

  @JsonKey(name: 'deviceCode')
  String deviceCode;

  @JsonKey(name: 'deviceUuid')
  String deviceUuid;

  @JsonKey(name: 'storeId')
  int storeId;

  @JsonKey(name: 'connectModel')
  int connectModel;

  @JsonKey(name: 'printerName')
  String printerName;

  @JsonKey(name: 'printerIp')
  String printerIp;

  @JsonKey(name: 'printerDevice')
  String printerDevice;

  @JsonKey(name: 'printerBrand')
  String printerBrand;

  @JsonKey(name: 'paperWidth')
  int paperWidth;

  @JsonKey(name: 'purpose')
  int purpose;

  @JsonKey(name: 'status')
  int status;

  @JsonKey(name: 'deleted')
  int deleted;

  @JsonKey(name: 'cuserId')
  int cuserId;

  @JsonKey(name: 'cuserName')
  String cuserName;

  @JsonKey(name: 'uuserId')
  int uuserId;

  @JsonKey(name: 'uuserName')
  String uuserName;

  Printer(
    this.id,
    this.ctime,
    this.utime,
    this.printerGuid,
    this.deviceId,
    this.deviceCode,
    this.deviceUuid,
    this.storeId,
    this.connectModel,
    this.printerName,
    this.printerIp,
    this.printerDevice,
    this.printerBrand,
    this.paperWidth,
    this.purpose,
    this.status,
    this.deleted,
    this.cuserId,
    this.cuserName,
    this.uuserId,
    this.uuserName,
  );

  factory Printer.fromJson(Map<String, dynamic> srcJson) => _$PrinterFromJson(srcJson);

  Map<String, dynamic> toJson() => _$PrinterToJson(this);
}
